package com.example.hello;

import android.app.ListActivity;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.ListAdapter;

import java.util.ArrayList;
import java.util.List;

public class food_message extends ListActivity {
    private static final String TAG = "food_message";
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //setContentView(R.layout.activity_food_message);
        listManager manager = new listManager(this);
        List<String> retlist = new ArrayList<>();
        for(RateItem item : manager.listAll()){
            retlist.add(item.getCurName()+"---->"+item.getCurRate());
        }
        ListAdapter adapter = new ArrayAdapter<String>(food_message.this,android.R.layout.simple_list_item_1,retlist);
        setListAdapter(adapter);
    }
}